home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 85 / CDMM85_1.ISO / Monopoly Tycoon / MTycoonDemo.exe / data1.cab / scripts / DEFAULT / general.lua < prev    next >
Encoding:
Text File  |  2001-10-24  |  4.6 KB  |  124 lines

  1. DecadePromptHeading = ID_PROMPT_1_OFFSET;
  2.  
  3. -----------------------------------------------------------------------------------------
  4. -- SetCamPos. A standard wrapped function for setting up initial camera positions
  5. -----------------------------------------------------------------------------------------
  6. function SetCamPos(x, y, z, lx, ly, lz)
  7.     Camera.SetMode(FREECAM);
  8.     Camera.x = x;
  9.     Camera.y = y;
  10.     Camera.z = z;
  11.     Camera.lx = lx;
  12.     Camera.ly = ly;
  13.     Camera.lz = lz;
  14. end;
  15.  
  16. -----------------------------------------------------------------------------------------
  17. -- used to register prompts for future appearances
  18. -----------------------------------------------------------------------------------------
  19. function RegisterPrompt(a, day, hours, mins)
  20.     numticks = (day-1)*GAME_YEAR + (hours-HOUR_9)*GAME_HOUR + mins*GAME_MINUTE;
  21.     C_TriggerEventAbsolute("CreatePrompt", numticks, a);
  22. end;
  23.  
  24. -----------------------------------------------------------------------------------------
  25. -- BlockCam. A standard event to set Block Camera
  26. -----------------------------------------------------------------------------------------
  27. function EVENT_BlockCam(a)
  28.     Camera.SetMode(BLOCKCAM, a);
  29. end;
  30.  
  31. -----------------------------------------------------------------------------------------
  32. -- OrbitCam. A standard event to set Orbit Camera
  33. -----------------------------------------------------------------------------------------
  34. function EVENT_OrbitCam(a)
  35.     Camera.SetMode(ORBITCAM, a);
  36. end;
  37.  
  38. -----------------------------------------------------------------------------------------
  39. -- DistrictCam. A standard event to set District Camera
  40. -----------------------------------------------------------------------------------------
  41. function EVENT_DistrictCam(a)
  42.     Camera.SetMode(DISTRICTCAM, a);
  43. end;
  44.  
  45. function EVENT_SetPlanView()
  46.     Camera.SetPlanView();
  47. end;
  48.  
  49.  
  50. -----------------------------------------------------------------------------------------
  51. -- Takes a list and an entry, and returns the value at that entry.
  52. -----------------------------------------------------------------------------------------
  53. function GetListEntry(t, a)
  54.     local count = 0;
  55.     a = (t.n - a) + 1;
  56.     if a < 0 then return nil end
  57.     for i,v in t do
  58.         count = count + 1
  59.         if count == a then
  60.             return v;
  61.         end;
  62.     end;
  63.     return nil;
  64. end;
  65.  
  66. ------------------------------------------------
  67. -- INTRODUCTION OF BUSINESSES AND COMMODITIES --
  68. ------------------------------------------------
  69.  
  70. function EVENT_BusinessIntro1940()
  71.     BusinessInfo[ANTIQUE_STORE].available = true;
  72.     Commodity[ANTIQUES].active = true;
  73.     BusinessInfo[POOL_HALL].available = true;
  74.     Commodity[GAMING].active = true;
  75.     BusinessInfo[ICECREAM_PARLOUR].available = true;
  76.     Commodity[SWEETS].active = true;
  77.     BusinessInfo[NIGHTCLUB].available = true;
  78.     Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+3);
  79.     C_PlaySound("harpstrum.wav");
  80. end;
  81.  
  82. function EVENT_BusinessIntro1950()
  83.     BusinessInfo[FAST_FOOD_OUTLET].available = true;
  84.     Commodity[FASTFOOD].active = true;
  85.     BusinessInfo[MUSIC_STORE].available = true;
  86.     Commodity[MUSIC_TAPES].active = true;
  87.     BusinessInfo[DELI].available = true;
  88.     BusinessInfo[SPORTS_STORE].available = true;
  89.     Commodity[RECREATIONAL_GOODS].active = true;
  90.     Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+4);
  91.     C_PlaySound("harpstrum.wav");
  92. end;
  93.  
  94. function EVENT_BusinessIntro1960()
  95.     BusinessInfo[PHARMACY].available = true;
  96.     BusinessInfo[BOWLING_ALLEY].available = true;
  97.     BusinessInfo[TRAVEL_AGENCY].available = true;
  98.     Commodity[VACATIONS].active = true;
  99.     BusinessInfo[GENERAL_STORE].available = true;
  100.     Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+5);
  101.     C_PlaySound("harpstrum.wav");
  102. end;
  103.  
  104. function EVENT_BusinessIntro1970()
  105.     BusinessInfo[VIDEO_STORE].available = true;
  106.     Commodity[VIDEOS].active = true;
  107.     BusinessInfo[HEALTH_CLINIC].available = true;
  108.     BusinessInfo[AMUSEMENT_ARCADE].available = true;
  109.     BusinessInfo[DEPARTMENT_STORE].available = true;
  110.     Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+6);
  111.     C_PlaySound("harpstrum.wav");
  112. end;
  113.  
  114. function EVENT_BusinessIntro1980()
  115.     BusinessInfo[SUPERMARKET].available = true;
  116.     BusinessInfo[COMPUTER_STORE].available = true;
  117.     Commodity[COMPUTERS].active = true;
  118.     BusinessInfo[PHONE_SHOP].available = true;
  119.     Commodity[CELL_PHONES].active = true;
  120.     BusinessInfo[ELECTRICAL_SUPERSTORE].available = true;
  121.     Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+7);
  122.     C_PlaySound("harpstrum.wav");
  123. end;
  124.